//
//  WBComposeTypeButton.swift
//  Weibo
//
//  Created by yinbo on 2018/4/8.
//  Copyright © 2018年 yinbo. All rights reserved.
//

import UIKit

class WBComposeTypeButton: UIControl {
    /*
    // Only override draw() if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    override func draw(_ rect: CGRect) {
        // Drawing code
    }
    */
    @IBOutlet weak var imageView: UIImageView!
    
    @IBOutlet weak var titleLab: UILabel!
    var clsName:String?
    class func composeTypeButton(imageName:String,title:String)->WBComposeTypeButton{
        let nib = UINib(nibName: "WBComposeTypeButton", bundle: nil)
        let btn = nib.instantiate(withOwner: nil, options: nil)[0] as! WBComposeTypeButton
        btn.frame = CGRect(x: 0, y: 0, width: 100, height: 100)
        btn.imageView.image = UIImage(named: imageName)
        btn.titleLab.text = title
        return btn
    }
}
